package com.ysy.constant;



public class RedisConstant {

    /**
     * 用户获赞和收藏总数
     */
    private static String USER_COUNT = "user:count:";
    public static String getUserCountKey(Long userId) {
        return USER_COUNT + userId;
    }

    /**
     * 笔记被喜欢数
     */
    private static String NOTE_COUNT = "note:count:";
    public static String getNoteCountKey(Long noteId) {
        return NOTE_COUNT + noteId;
    }

    /**
     * 笔记被收藏数
     */
    private static String COLLECT_COUNT = "collect:count:";
    public static String getCollectCountKey(Long noteId) {
        return COLLECT_COUNT + noteId;
    }

    public static final String HASH_FIELD_FOLLOW_TOTAL = "followTotal";
    public static final String HASH_FIELD_FANS_TOTAL = "fansTotal";
    public static final String HASH_FIELD_LIKE_TOTAL = "likeTotal";
    public static final String HASH_FIELD_COLLECT_TOTAL = "collectTotal";
}
